package com.zhkjnet.zhyy.dao;

import com.zhkjnet.zhyy.entity.OilRecharge;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface OilRechargeDao {

    int save(OilRecharge oilRecharge);

    void update(OilRecharge oilRecharge);

    List<OilRecharge> findAll(@Param("offset") Long offset, @Param("count") Integer count);

    Long count();

    List<OilRecharge> findAllByCardId(Long cardId);

    List<OilRecharge> findAllByUserId(@Param("userId") Long userId, @Param("offset") Long offset, @Param("count") Integer count);

    /**
     * 查询所有要获取结果的充值记录
     * @param time  小于订单创建时间
     * @return
     */
    List<OilRecharge> findAllResult(Date time);

}